<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Lead</title>
<?php echo $html->stylesheet('menu.css'); ?>
<?php echo $html->stylesheet('calendario.css'); ?>
<?php echo $html->script('menu.js'); ?>
<?php echo $html->script('jquery.js'); ?>
<?php echo $html->script('calendario.js'); ?>
<?php echo $html->script('highcharts/highcharts.js'); ?>
<?php echo $html->script('filtro_data.js'); ?>
<?php echo $html->script('filtro_campanha.js'); ?>
<?php echo $html->script('filtro_busca.js'); ?>
<?php echo $html->stylesheet('rmsforms.css'); ?>

</head>

<body>
<div id="geral" align="center">
<div id="logo"><a href="index.html"><?php echo $html->image('logo.png', array('border' => '0')); ?></a></div>
<div id="envelope"><?php echo $html->image('envelope.png'); ?></div>
<div class="usuario"><strong><?php echo $_SESSION['usua_nome']?></strong> | Configurações | <?php echo $html->link('Sair', '/usuario/logout'); ?></div>
<div id="menu">
	<ul id="sddm">
		<li><a href="index.html" onmouseover="mopen('m1')" onmouseout="mclosetime()">Home</a></li>
		<li><a href="#" onmouseover="mopen('m2')" onmouseout="mclosetime()">Formulários</a>
		<div id="m2" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
			<?php if($bAddCampanha) echo $html->link('Novo formulário', '/campanha/adicionar'); ?>
			<?php echo $html->link('Lista de formulários', '/campanha'); ?>
		</div>
		</li>
		<li><?php echo $html->link('Lead', '/lead'); ?></li>
		<li><a href="lead.html" onmouseover="mopen('m4')" onmouseout="mclosetime()">Relatórios</a></li>
	</ul>
	<div style="clear:both"></div>
</div>
<h2 class="dashboard">Dashboard - Leads</h2>
<h4 class="leads">Leads controlados em tempo real</h4>
<div id="formulario-pesquisa">
	<form  name="pesquisa" method="post" action="#">
		<label>
			<input name="input-search" type="text" class="form" id="email" /><input name="" type="image" src="<?php echo Mapper::url('/images/bt-pesquisar.png'); ?>" class="botao-pesquisa" />
		</label>
	</form>
</div>

<div id="formulario-campanha">
	<form  name="campanha" method="post" action="#">
		<table width="528" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td width="130">
				<input NAME="data1" SIZE="6" MAXLENGTH="10" value="<?php echo $_SESSION['data1'] ?>"> 
				<input TYPE="button" NAME="btnData1" VALUE="..." Onclick="javascript:popdate('document.campanha.data1','pop1','150',document.campanha.data1.value)">
                <span id="pop1" style="position:absolute; z-index:99999999999;"></span><span id="pop2" style="position:absolute; z-index:99999999999;"></span></td>
				<td width="120"><input name="data2" size="6" maxlength="10" value="<?php echo $_SESSION['data2'] ?>" />
			    <input type="button" name="btnData2" value="..." onclick="javascript:popdate('document.campanha.data2','pop2','150',document.campanha.data2.value)" /></td>
			  <td width="86"><input type="button" name="filtrar" value='Filtrar' /></td>
				<td width="192">
				<select name="" id="filtro_campanha" class="campanha">
				<option value='0'>Escolha o formulário</option>
				<?php
					foreach($arrTodasCampanhas as $objCampanha)
					{
						$objCampanha = (object) $objCampanha;
						
						echo '<option value="'.$objCampanha->camp_id.'" '.(($objCampanha->camp_id == $_SESSION['filtro_campanha']) ? 'selected="selected"' : '').'>'.$objCampanha->camp_nome.'</option>';
					}
				?>
			  </select></td>
		  </tr>
	  </table>
  </form>
</div>
	
 <?php echo $this->contentForLayout ?>